-- GENERATED SPELL FOR [Diseased Ghoul] --


function spell0_10495(pUnit, Event) --@Cloud of Disease,Self--
pUnit:FullCastSpellOnTarget(17742,pUnit)
pUnit:RegisterEvent('Sorts_10495', 20000, 1)
end

function spell1_10495(pUnit, Event) --@Disease Cloud,Self--
pUnit:FullCastSpellOnTarget(12627,pUnit)
pUnit:RegisterEvent('Sorts_10495', 0, 1)
end

function Sorts_10495(pUnit, Event)
local choix_sorts_10495 = math.random(0, 1)
if choix_sorts_10495 == 0 then
pUnit:RegisterEvent('spell0_10495', 1, 1)
end
if choix_sorts_10495 == 1 then
pUnit:RegisterEvent('spell1_10495', 1, 1)
end
end

function mob10495_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_10495', math.random(1500, 3000), 1)
end

function mob10495_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob10495_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob10495_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(10495, 1, 'mob10495_Action')
RegisterUnitEvent(10495, 2, 'mob10495_Leave')
RegisterUnitEvent(10495, 3, 'mob10495_Kill')
RegisterUnitEvent(10495, 4, 'mob10495_Die')
